{% extends 'window.twig' %}
{% block body %}

    <div class="admin-main-container" style="margin: 10px 5px">
        <div class="group-wrapper data-view">
            <div class="">
                <p>将会设置下列用户的分组</p>
                {{ userList }}
            </div>
            <div class="line"></div>
            <div class="">
                {% for g in groupList %}
                    <label for="g_i_{{ g.id }}">
                        <input type="radio" name="group_id" id="g_i_{{ g.id }}" class="i-check group-id" value="{{ g.id }}"/>
                        {{ g.title }}
                    </label>
                {% endfor %}
            </div>
            <div class="row text-right">
                <button class="btn btn-info ajax-post" url="user.set.group?id={{ user_ids }}"
                        data-null="请选择要设置的组" target-form="group-id" style="  margin-right: 15px;">
                    确认选择
                </button>
            </div>
        </div>
        <div style="height: 30px;"></div>
    </div>
{% endblock %}
{% block script %}
<link href="{{ __URL__ }}/static/assets/icheck/skins/square/_all.css" rel="stylesheet">
<style type="text/css">body{overflow: hidden;}</style>
<script type="text/javascript" src="{{ __URL__ }}/static/assets/icheck/icheck.min.js"></script>
<script type="text/javascript">
    $(function(){
        var index = util.getIndex(window);
        setTimeout(function(){
            dx.iframeAuto(index);
            util.resize(window,450);
        },100);
        $('.i-check').iCheck({
                    checkboxClass: 'icheckbox_square-blue',
                    radioClass: 'iradio_square-blue',
                    increaseArea: '20%'
                });
    });
</script>
{% endblock %}